'use strict';
/**
 * Created by MetaLab_K on 2016/1/26.
 */
angular.module('metalabPartnerApp').directive('metaSearchBar', function () {
    return {
        restrict: 'AE',
        templateUrl: 'views/talent/directives/search-bar.html',
        controller: 'MetaSearchBarCtrl',
        scope: {
            searchText: '=',
            keywords: '='
        },
        transclude: true,
        replace: true
    };
}).controller('MetaSearchBarCtrl', ["$scope", function ($scope) {
    /**
     * @function 移除关键词
     * @param str 要移除的关键词内容
     */
    $scope.removeKeyword = function (str) {
        $scope.keywords.splice($scope.keywords.indexOf(str), 1);
    }
}]);
